package com.example.fuluchou.controller.param;


import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class DrawPrizeParam implements Serializable{

    @NotNull(message = "活动Id不能为空")
    private Long activityId;

    @NotNull(message = "奖品Id不能为空")
    private Long prizeId;


    @NotNull(message = "中奖时间不能为空")
    private Date winningTime;

    @NotEmpty(message = "中奖者列表不能为空")
    @Valid
    private List<Winner> winnerList;

    @Data
    public static class  Winner implements Serializable{

        @NotNull(message = "用户Id不能为空")
        private Long userId;

        @NotBlank(message = "用户姓名不能为空")
        private String userName;
    }
}
